package com.iot.rule.api.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.iot.common.core.constant.ServiceNameConstants;
import com.iot.common.core.domain.mqtt.Payload;
import com.iot.common.core.util.R;
import com.iot.rule.api.feign.factory.RemoteRuleServiceFallbackFactory;

@FeignClient(contextId = "remoteRuleService", value = ServiceNameConstants.RULE_SERVICE,
fallbackFactory = RemoteRuleServiceFallbackFactory.class)
public interface RemoteRuleService {
	
	@PostMapping("/handle")
	R<Payload> handle(@RequestBody Payload payload);

}
